home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / file-tra / fsp-2.7 / fsp-2 / fsp / include / ls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-07  |  2.9 KB  |  83 lines

  1. /*
  2.  * Copyright (c) 1989 The Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * This code is derived from software contributed to Berkeley by
  6.  * Michael Fischbein.
  7.  *
  8.  * Redistribution and use in source and binary forms are permitted
  9.  * provided that: (1) source distributions retain this entire copyright
  10.  * notice and comment, and (2) distributions including binaries display
  11.  * the following acknowledgement:  ``This product includes software
  12.  * developed by the University of California, Berkeley and its contributors''
  13.  * in the documentation or other materials provided with the distribution
  14.  * and in all advertising materials mentioning features or use of this
  15.  * software. Neither the name of the University nor the names of its
  16.  * contributors may be used to endorse or promote products derived
  17.  * from this software without specific prior written permission.
  18.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  19.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  20.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21.  *
  22.  *    @(#)ls.h    5.10 (Berkeley) 4/8/90
  23.  */
  24.  
  25. #ifndef _FSP_LS_H_
  26. #define _FSP_LS_H_
  27.  
  28. typedef struct _lsstruct {
  29.     char *name;            /* file name */
  30.     int len;            /* file name length */
  31.     struct stat lstat;        /* lstat(2) for file */
  32. } LS;
  33.  
  34. /*
  35.  * overload -- we probably have to save blocks and/or maxlen with the lstat
  36.  * array, so tabdir() stuffs it into unused fields in the first stat structure.
  37.  * If there's ever a type larger than u_long, fix this.  Any calls to qsort
  38.  * must save and restore the values.
  39.  */
  40. #define    st_btotal    st_dev
  41. #define    st_maxlen    st_rdev
  42.  
  43. #ifndef VMS /* linker complains about this */
  44. extern int errno;
  45. #endif
  46.  
  47. extern int f_accesstime;    /* use time of last access */
  48. extern int f_group;        /* show group ownership of a file */
  49. extern int f_inode;        /* print inode */
  50. extern int f_kblocks;        /* print size in kilobytes */
  51. extern int f_longform;        /* long listing format */
  52. extern int f_singlecol;        /* use single column output */
  53. extern int f_size;        /* list size in short listing */
  54. extern int f_statustime;    /* use time of last mode change */
  55. extern int f_total;        /* if precede with "total" line */
  56. extern int f_type;        /* add type character for non-regular files */
  57.  
  58. /* cmp.c */
  59. extern int namecmp PROTO0((LS *, LS *));
  60. extern int revnamecmp PROTO0((LS *, LS *));
  61. extern int modcmp PROTO0((LS *, LS *));
  62. extern int revmodcmp PROTO0((LS *, LS *));
  63. extern int acccmp PROTO0((LS *, LS *));
  64. extern int revacccmp PROTO0((LS *, LS *));
  65. extern int statcmp PROTO0((LS *, LS *));
  66. extern int revstatcmp PROTO0((LS *, LS *));
  67.  
  68. /* ls.c */
  69. extern void fls_main PROTO0((int, char **));
  70.  
  71. /* print.c */
  72. extern void printscol PROTO0((LS *, int));
  73. extern void printlong PROTO0((LS *, int));
  74. extern void printcol PROTO0((LS *, int));
  75.  
  76. /* util.c */
  77. extern void prcopy PROTO0((char *, char *, int));
  78. extern char *emalloc PROTO0((int));
  79. extern int nomem PROTO0((void));
  80. extern void usage PROTO0((void));
  81.  
  82. #endif /* _FSP_LS_H_ */
  83.